#!/usr/bin/python
# -*- coding:utf-8 -*-
# @author  : micah
# @time    :  
# @function: 
# @version :


student_info = {
    "name": "Micah",
    "age": 20,
    "gender": "male",
    "hobby": ["basketball", "football", "swimming"]}

# 通过[]取值的方式如果key不存在，会抛出异常
# print(student_info['address'])

# 通过get()方法取值，如果key不存在，会返回None
# get方法可以传入第二个参数，如果key不存在，返回第二个参数的值
print(student_info.get('phone', '当前没有联系方式'))
